home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / turbotut.arc / ALLVAR.PAS next >
Pascal/Delphi Source File  |  1989-06-30  |  863b  |  29 lines

  1. PROGRAM all_simple_variable_types;
  2.  
  3. VAR  a,b         : INTEGER;
  4.      c,d         : BYTE;
  5.      dog_tail    : REAL;
  6.      puppy       : BOOLEAN;
  7.      animal_cookies : CHAR;
  8.  
  9. BEGIN
  10.   a := 4;
  11.   b := 5;
  12.   c := 212;
  13.   d := c + 3;
  14.   dog_tail := 345.12456;
  15.   puppy := b > a;  (* since b is greater than a, puppy
  16.                       will be assigned the value TRUE *)
  17.   animal_cookies := 'R';  (* this is a single character *)
  18.  
  19.   WRITELN('The integers are',a:5,b:5);
  20.   WRITELN('The bytes are',   c:5,d:5); (* notice that the spaces
  21.                                           prior to the c will be
  22.                                           ignored on output *)
  23.   WRITELN('The real value is',dog_tail:12:2,dog_tail:12:4);
  24.   WRITELN;
  25.   WRITELN('The boolean value is ',puppy,puppy:13);
  26.   WRITELN('The char variable is an ',animal_cookies);
  27. END.
  28.  
  29.